<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core" xml:lang="en" lang="en">

	<ui:include src="ComponentCriteria.xhtml"></ui:include>

	<h:body>
		<br />
		<br />
		<h:form>
	
			<h:commandButton action="#{requestManager.findClosedRequestWithPOByComponent}"
				value="Buscar"></h:commandButton>
		</h:form>
        
        <br />
		<br />
		<h:form id="myForm" rendered="#{requestManager.showRequestList}">
			<h:outputLabel for="requests" value="Lista de Requests" />

			<h:panelGroup>
				<h:panelGrid columns="2">
					<h:panelGrid columns="1">
						<h:selectOneRadio id="radio1" layout="pageDirection"
							value="#{requestManager.requestIdSelected}">
							<f:selectItems value="#{requestManager.lstRequestItem}" />
						</h:selectOneRadio>
					</h:panelGrid>
					<h:panelGrid columns="1">
						<h:dataTable id="requestTable" var="requestBid"
							value="#{requestManager.lstRequest}" border="1">

							<h:column>
								<h:outputText value="#{requestBid.component.description}" />
							</h:column>
							<h:column>
								<h:outputText value="#{requestBid.quantity}" />
							</h:column>
							<h:column>
								$<h:outputText value="#{requestBid.priceThreshold}" />
							</h:column>
							<h:column>
								<h:outputText value="#{requestBid.status}" />
							</h:column>
						</h:dataTable>
					</h:panelGrid>
				</h:panelGrid>
			</h:panelGroup>
			<h:commandButton action="#{requestManager.scheduleWork}"
				value="Programar Trabajo"></h:commandButton>
		</h:form>
        
	</h:body>

</html>
